//
//Author: thanhntt89
//Date: 29/2/2012
//
$(function(){
    var cur_href = $(location).attr('href');
    var href = '';
    if(cur_href.indexOf('filter_m_name') != -1){
        href = cur_href.substring(0, cur_href.indexOf('filter_m_name')-1);
        var index = cur_href.indexOf('filter_m_name');
        var filter_name = cur_href.substring(index*1+14*1, index*1+15).toUpperCase();
        if(filter_name != null&&filter_name != ''){
            $('.search-kt td:contains('+filter_name+')').addClass('select');
        }
    }
    else href = cur_href;
    $('.search-kt td').click(function(){
        location = href+'&filter_m_name='+$(this).html().toLowerCase();
    });
});